#include "direction.h"

coord_t direction_apply (coord_t from, Direction dir, int steps)
{
	switch (dir) {
		default:
		case DIR_NONE : break;
		case DIR_DOWN : from.y += steps; break;
		case DIR_UP   : from.y -= steps; break;
		case DIR_LEFT : from.x -= steps; break;
		case DIR_RIGHT: from.x += steps; break;
	}
	
	return from;
}
